From 7e64756f40aac3edccca2717f5d62d54ec6da785 Mon Sep 17 00:00:00 2001 From: tsteven4 Date: Tue, 26 Jun 2018 12:01:42 -0600 Subject: [PATCH] fix missing-field-initializers clang diagnostic. (#207) --- alan.cc | 14 ++++++++------ an1.cc | 18 +++++++++--------- bushnell.cc | 4 +++- bushnell_trl.cc | 4 +++- compegps.cc | 8 ++++---- dmtlog.cc | 2 +- energympro.cc | 21 +++++++++++---------- enigma.cc | 4 +++- exif.cc | 4 +++- garmin_txt.cc | 2 +- gdb.cc | 10 +++++----- gtrnctr.cc | 4 ++-- kml.cc | 3 ++- ozi.cc | 20 ++++++++++---------- pcx.cc | 4 ++-- 15 files changed, 67 insertions(+), 55 deletions(-) diff --git a/alan.cc b/alan.cc index 2bcb68ee2..5ad256fa2 100644 --- a/alan.cc +++ b/alan.cc @@ -999,9 +999,10 @@ ff_vecs_t alanwpr_vecs = { wpr_write, alan_exit, wpr_args, - CET_CHARSET_ASCII, 0 /* ascii is the expected character set */ - /* not fixed, can be changed through command - line parameter */ + CET_CHARSET_ASCII, 0, /* ascii is the expected character set */ + /* not fixed, can be changed through command line parameter */ + NULL_POS_OPS, + nullptr }; ff_vecs_t alantrl_vecs = { @@ -1019,7 +1020,8 @@ ff_vecs_t alantrl_vecs = { trl_write, alan_exit, trl_args, - CET_CHARSET_ASCII, 0 /* ascii is the expected character set */ - /* not fixed, can be changed through command - line parameter */ + CET_CHARSET_ASCII, 0, /* ascii is the expected character set */ + /* not fixed, can be changed through command line parameter */ + NULL_POS_OPS, + nullptr }; diff --git a/an1.cc b/an1.cc index 6719f62b7..873ce1e51 100644 --- a/an1.cc +++ b/an1.cc @@ -59,40 +59,40 @@ static arglist_t an1_args[] = { { "type", &output_type, "Type of .an1 file", - "", ARGTYPE_STRING, ARG_NOMINMAX + "", ARGTYPE_STRING, ARG_NOMINMAX, nullptr }, { "road", &road_changes, "Road type changes", - "", ARGTYPE_STRING, ARG_NOMINMAX + "", ARGTYPE_STRING, ARG_NOMINMAX, nullptr }, { "nogc", &nogc, "Do not add geocache data to description", - nullptr, ARGTYPE_BOOL, ARG_NOMINMAX + nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "nourl", &nourl, "Do not add URLs to description", - nullptr, ARGTYPE_BOOL, ARG_NOMINMAX + nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "deficon", &opt_symbol, "Symbol to use for point data", - "Red Flag", ARGTYPE_STRING, ARG_NOMINMAX + "Red Flag", ARGTYPE_STRING, ARG_NOMINMAX, nullptr }, { "color", &opt_color, "Color for lines or mapnotes", - "red", ARGTYPE_STRING, ARG_NOMINMAX + "red", ARGTYPE_STRING, ARG_NOMINMAX, nullptr }, { "zoom", &opt_zoom, "Zoom level to reduce points", - nullptr, ARGTYPE_INT, ARG_NOMINMAX + nullptr, ARGTYPE_INT, ARG_NOMINMAX, nullptr }, { "wpt_type", &opt_wpt_type, "Waypoint type", - "", ARGTYPE_STRING, ARG_NOMINMAX + "", ARGTYPE_STRING, ARG_NOMINMAX, nullptr }, { "radius", &opt_radius, "Radius for circles", - nullptr, ARGTYPE_STRING, ARG_NOMINMAX + nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr }, ARG_TERMINATOR }; diff --git a/bushnell.cc b/bushnell.cc index 7d16d2b67..f6e424375 100644 --- a/bushnell.cc +++ b/bushnell.cc @@ -268,5 +268,7 @@ ff_vecs_t bushnell_vecs = { bushnell_write, nullptr, bushnell_args, - CET_CHARSET_MS_ANSI, 0 /* Not really sure... */ + CET_CHARSET_MS_ANSI, 0, /* Not really sure... */ + NULL_POS_OPS, + nullptr }; diff --git a/bushnell_trl.cc b/bushnell_trl.cc index e61b512de..ec6ca14f0 100644 --- a/bushnell_trl.cc +++ b/bushnell_trl.cc @@ -147,5 +147,7 @@ ff_vecs_t bushnell_trl_vecs = { bushnell_write, nullptr, bushnell_args, - CET_CHARSET_MS_ANSI, 0 /* Not really sure... */ + CET_CHARSET_MS_ANSI, 0, /* Not really sure... */ + NULL_POS_OPS, + nullptr }; diff --git a/compegps.cc b/compegps.cc index e8919a6ef..b9a098016 100644 --- a/compegps.cc +++ b/compegps.cc @@ -92,19 +92,19 @@ static arglist_t compegps_args[] = { { "deficon", &option_icon, "Default icon name", - nullptr, ARGTYPE_STRING, ARG_NOMINMAX + nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr }, { "index", &option_index, "Index of route/track to write (if more than one in source)", - nullptr, ARGTYPE_INT, "1", nullptr + nullptr, ARGTYPE_INT, "1", nullptr, nullptr }, { "radius", &option_radius, "Give points (waypoints/route points) a default radius (proximity)", - nullptr, ARGTYPE_FLOAT, "0", nullptr + nullptr, ARGTYPE_FLOAT, "0", nullptr, nullptr }, { "snlen", &option_snlen, "Length of generated shortnames (default 16)", - "16", ARGTYPE_INT, "1", nullptr + "16", ARGTYPE_INT, "1", nullptr, nullptr }, ARG_TERMINATOR }; diff --git a/dmtlog.cc b/dmtlog.cc index 7dbef864e..7f034015a 100644 --- a/dmtlog.cc +++ b/dmtlog.cc @@ -53,7 +53,7 @@ static arglist_t dmtlog_args[] = { { "index", &opt_index, - "Index of track (if more than one in source)", "1", ARGTYPE_INT, "1", nullptr + "Index of track (if more than one in source)", "1", ARGTYPE_INT, "1", nullptr, nullptr }, ARG_TERMINATOR }; diff --git a/energympro.cc b/energympro.cc index 338fb4376..aeb325e16 100644 --- a/energympro.cc +++ b/energympro.cc @@ -304,14 +304,15 @@ ff_vecs_t energympro_vecs = { ff_cap_read, // tracks ff_cap_none // routes }, - rd_init, // rd_init - nullptr, // wr_init - rd_deinit, // rd_deinit - nullptr, // wr_deinit - data_read, // read - nullptr, // write - nullptr, // exit - nullptr, //args - CET_CHARSET_ASCII, 0 //encode,fixed_encode - //NULL //name dynamic/internal? + rd_init, // rd_init + nullptr, // wr_init + rd_deinit, // rd_deinit + nullptr, // wr_deinit + data_read, // read + nullptr, // write + nullptr, // exit + nullptr, // args + CET_CHARSET_ASCII, 0, // encode, fixed_encode + NULL_POS_OPS, + nullptr }; diff --git a/enigma.cc b/enigma.cc index 5ecd4ece6..0a3de6f17 100644 --- a/enigma.cc +++ b/enigma.cc @@ -217,5 +217,7 @@ ff_vecs_t enigma_vecs = { data_write, nullptr, nullptr, - CET_CHARSET_ASCII, 0 /* CET-REVIEW */ + CET_CHARSET_ASCII, 0, /* CET-REVIEW */ + NULL_POS_OPS, + nullptr }; diff --git a/exif.cc b/exif.cc index 48d09b3a4..85e11c202 100644 --- a/exif.cc +++ b/exif.cc @@ -1562,7 +1562,9 @@ ff_vecs_t exif_vecs = { exif_write, nullptr, exif_args, - CET_CHARSET_UTF8, 0 + CET_CHARSET_UTF8, 0, + NULL_POS_OPS, + nullptr }; /**************************************************************************/ diff --git a/garmin_txt.cc b/garmin_txt.cc index 38270128f..790037089 100644 --- a/garmin_txt.cc +++ b/garmin_txt.cc @@ -116,7 +116,7 @@ static arglist_t garmin_txt_args[] = { {"date", &opt_date_format, "Read/Write date format (i.e. yyyy/mm/dd)", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr}, {"datum", &opt_datum, "GPS datum (def. WGS 84)", "WGS 84", ARGTYPE_STRING, ARG_NOMINMAX, nullptr}, - {"dist", &opt_dist, "Distance unit [m=metric, s=statute]", "m", ARGTYPE_STRING, ARG_NOMINMAX}, + {"dist", &opt_dist, "Distance unit [m=metric, s=statute]", "m", ARGTYPE_STRING, ARG_NOMINMAX, nullptr}, {"grid", &opt_grid, "Write position using this grid.", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr}, {"prec", &opt_precision, "Precision of coordinates", "3", ARGTYPE_INT, ARG_NOMINMAX, nullptr}, {"temp", &opt_temp, "Temperature unit [c=Celsius, f=Fahrenheit]", "c", ARGTYPE_STRING, ARG_NOMINMAX, nullptr}, diff --git a/gdb.cc b/gdb.cc index 8e959c267..8709ea011 100644 --- a/gdb.cc +++ b/gdb.cc @@ -1856,26 +1856,26 @@ static arglist_t gdb_args[] = { { GDB_OPT_CATEGORY, &gdb_opt_category, "Default category on output (1..16)", - nullptr, ARGTYPE_INT, "1", "16" + nullptr, ARGTYPE_INT, "1", "16", nullptr }, { GDB_OPT_BITCATEGORY, &gdb_opt_bitcategory, "Bitmap of categories", - nullptr, ARGTYPE_INT, "1", "65535" + nullptr, ARGTYPE_INT, "1", "65535", nullptr }, { GDB_OPT_VER, &gdb_opt_ver, "Version of gdb file to generate (1..3)", - "2", ARGTYPE_INT, "1", "3" + "2", ARGTYPE_INT, "1", "3", nullptr }, { GDB_OPT_VIA, &gdb_opt_via, "Drop route points that do not have an equivalent waypoint (hidden points)", - nullptr, ARGTYPE_BOOL, ARG_NOMINMAX + nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { GDB_OPT_ROADBOOK, &gdb_opt_roadbook, "Include major turn points (with description) from calculated route", - nullptr, ARGTYPE_BOOL, ARG_NOMINMAX + nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, ARG_TERMINATOR diff --git a/gtrnctr.cc b/gtrnctr.cc index a6916c6fa..45b5f7f16 100644 --- a/gtrnctr.cc +++ b/gtrnctr.cc @@ -59,11 +59,11 @@ static arglist_t gtc_args[] = { { "course", &opt_course, "Write course rather than history, default yes", - "1", ARGTYPE_BOOL, ARG_NOMINMAX + "1", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "sport", &opt_sport, "Sport: Biking (deflt), Running, MultiSport, Other", - "Biking", ARGTYPE_STRING, ARG_NOMINMAX + "Biking", ARGTYPE_STRING, ARG_NOMINMAX, nullptr }, ARG_TERMINATOR }; diff --git a/kml.cc b/kml.cc index 164e5960b..c8642eb27 100644 --- a/kml.cc +++ b/kml.cc @@ -2233,5 +2233,6 @@ ff_vecs_t kml_vecs = { nullptr, kml_args, CET_CHARSET_UTF8, 1, /* CET-REVIEW */ - { nullptr, nullptr, nullptr, kml_wr_position_init, kml_wr_position, kml_wr_position_deinit } + { nullptr, nullptr, nullptr, kml_wr_position_init, kml_wr_position, kml_wr_position_deinit }, + nullptr }; diff --git a/ozi.cc b/ozi.cc index 2f8e1f409..e326fd686 100644 --- a/ozi.cc +++ b/ozi.cc @@ -74,43 +74,43 @@ static arglist_t ozi_args[] = { { "pack", &pack_opt, "Write all tracks into one file", - nullptr, ARGTYPE_BOOL, ARG_NOMINMAX + nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "snlen", &snlenopt, "Max synthesized shortname length", - "32", ARGTYPE_INT, "1", nullptr + "32", ARGTYPE_INT, "1", nullptr, nullptr }, { "snwhite", &snwhiteopt, "Allow whitespace synth. shortnames", - nullptr, ARGTYPE_BOOL, ARG_NOMINMAX + nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "snupper", &snupperopt, "UPPERCASE synth. shortnames", - nullptr, ARGTYPE_BOOL, ARG_NOMINMAX + nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "snunique", &snuniqueopt, "Make synth. shortnames unique", - nullptr, ARGTYPE_BOOL, ARG_NOMINMAX + nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "wptfgcolor", &wptfgcolor, "Waypoint foreground color", - "black", ARGTYPE_STRING, ARG_NOMINMAX + "black", ARGTYPE_STRING, ARG_NOMINMAX, nullptr }, { "wptbgcolor", &wptbgcolor, "Waypoint background color", - "yellow", ARGTYPE_STRING, ARG_NOMINMAX + "yellow", ARGTYPE_STRING, ARG_NOMINMAX, nullptr }, { "proximity", &proximityarg, "Proximity distance", - "0", ARGTYPE_STRING, ARG_NOMINMAX + "0", ARGTYPE_STRING, ARG_NOMINMAX, nullptr }, { "altunit", &altunit_opt, "Unit used in altitude values", - "feet", ARGTYPE_STRING, ARG_NOMINMAX + "feet", ARGTYPE_STRING, ARG_NOMINMAX, nullptr }, { "proxunit", &proxunit_opt, "Unit used in proximity values", - "miles", ARGTYPE_STRING, ARG_NOMINMAX + "miles", ARGTYPE_STRING, ARG_NOMINMAX, nullptr }, ARG_TERMINATOR }; diff --git a/pcx.cc b/pcx.cc index 935629755..9b5086141 100644 --- a/pcx.cc +++ b/pcx.cc @@ -44,10 +44,10 @@ static int lon_col; #define MYNAME "PCX" static arglist_t pcx_args[] = {{"deficon", &deficon, "Default icon name", - "Waypoint", ARGTYPE_STRING, ARG_NOMINMAX}, + "Waypoint", ARGTYPE_STRING, ARG_NOMINMAX, nullptr}, {"cartoexploreur", &cartoexploreur, "Write tracks compatible with Carto Exploreur", - nullptr, ARGTYPE_BOOL, ARG_NOMINMAX}, + nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr}, ARG_TERMINATOR}; static void rd_init(const QString& fname) { -- 2.30.2